﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace lcps.Web.Admin
{
    public partial class left : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                addNodes();

            }
            
            
           

        }

        private void addNodes()
        {
            TreeNode node_1_1 = new TreeNode();

            node_1_1.Text = "采购申请计划录入";
            node_1_1.NavigateUrl = "../welcome.aspx";
            node_1_1.Target = "mainFrame";
            node_1_1.SelectAction = TreeNodeSelectAction.SelectExpand;

            TreeNode node_1_11 = new TreeNode();

            node_1_11.Text = "采购申请单项录入";
            node_1_11.NavigateUrl = "../welcome.aspx";
            node_1_11.Target = "mainFrame";
           

            TreeNode node_1_12 = new TreeNode();

            node_1_12.Text = "采购申请批量导入";
            node_1_12.NavigateUrl = "../welcome.aspx";
            node_1_12.Target = "mainFrame";


            TreeNode node_1_13 = new TreeNode();

            node_1_13.Text = "维护申请计划";
            node_1_13.NavigateUrl = "../welcome.aspx";
            node_1_13.Target = "mainFrame";

            TreeNode node_1_2 = new TreeNode();
            node_1_2.Text = "采购订单录入维护";
            node_1_2.NavigateUrl = "../welcome.aspx";
            node_1_2.Target = "mainFrame";
            node_1_2.SelectAction = TreeNodeSelectAction.SelectExpand;

            TreeNode node_1_21 = new TreeNode();
            node_1_21.Text = "采购订单单项录入";
            node_1_21.NavigateUrl = "../welcome.aspx";
            node_1_21.Target = "mainFrame";

            TreeNode node_1_22 = new TreeNode();
            node_1_22.Text = "采购订单批量导入";
            node_1_22.NavigateUrl = "importData.aspx";
            node_1_22.Target = "mainFrame";
            TreeNode node_1_23 = new TreeNode();
            node_1_23.Text = "维护物资合同履约台帐计划";
            node_1_23.NavigateUrl = "search.aspx";
            node_1_23.Target = "mainFrame";
            TreeNode node_1_24 = new TreeNode();
            node_1_24.Text = "物资合同到货完成率统计";
            node_1_24.NavigateUrl = "../welcome.aspx";
            node_1_24.Target = "mainFrame";

            TreeNode node_1_3 = new TreeNode();
            node_1_3.Text = "物资供应计划输出";
            node_1_3.NavigateUrl = "search.aspx";
            node_1_3.Target = "mainFrame";
            node_1_3.SelectAction = TreeNodeSelectAction.SelectExpand;

            TreeNode node_1_31 = new TreeNode();
            node_1_31.Text = "履约明细表输出";
            node_1_31.NavigateUrl = "search.aspx?ty=4";
            node_1_31.Target = "mainFrame";

            TreeNode node_1_32 = new TreeNode();
            node_1_32.Text = "需求及生产情况月报";
            node_1_32.NavigateUrl = "search.aspx?ty=3";
            node_1_32.Target = "mainFrame";
            TreeNode node_1_33 = new TreeNode();
            node_1_33.Text = "计划表输出";
            node_1_33.NavigateUrl = "search.aspx?ty=2";
            node_1_33.Target = "mainFrame";
            TreeNode node_1_34 = new TreeNode();
            node_1_34.Text = "未到货明细表输出";
            node_1_34.NavigateUrl = "search.aspx?ty=1";
            node_1_34.Target = "mainFrame";
            TreeNode node_1_35 = new TreeNode();
            node_1_35.Text = "重点物资履约一览表";
            node_1_35.NavigateUrl = "search.aspx";
            node_1_35.Target = "mainFrame";

            node_1_1.ChildNodes.Add(node_1_11);
            node_1_1.ChildNodes.Add(node_1_12);
            node_1_1.ChildNodes.Add(node_1_13);

            node_1_2.ChildNodes.Add(node_1_21);
            node_1_2.ChildNodes.Add(node_1_22);
            node_1_2.ChildNodes.Add(node_1_23);
            node_1_2.ChildNodes.Add(node_1_24);

            node_1_3.ChildNodes.Add(node_1_31);
            node_1_3.ChildNodes.Add(node_1_32);
            node_1_3.ChildNodes.Add(node_1_33);
            node_1_3.ChildNodes.Add(node_1_34);
            node_1_3.ChildNodes.Add(node_1_35);
            this.TreeView1.Nodes.Add(node_1_1);
            this.TreeView1.Nodes.Add(node_1_2);
            this.TreeView1.Nodes.Add(node_1_3);

            TreeNode node_2_1 = new TreeNode();
            node_2_1.Text = "供应商不良记录录入";
            node_2_1.NavigateUrl = "../badinfo/add.aspx";
            node_2_1.Target = "mainFrame";
            node_2_1.SelectAction = TreeNodeSelectAction.SelectExpand;

            TreeNode node_2_2 = new TreeNode();
            node_2_2.Text = "供应商不良档案";
            node_2_2.NavigateUrl = "../badinfo/list.aspx";
            node_2_2.Target = "mainFrame";
            node_2_2.SelectAction = TreeNodeSelectAction.SelectExpand;


            TreeNode node_2_3 = new TreeNode();
            node_2_3.Text = "供应商产品质量监督";
            node_2_3.NavigateUrl = "../welcome.aspx";
            node_2_3.Target = "mainFrame";
            node_2_3.SelectAction = TreeNodeSelectAction.SelectExpand;


            TreeNode node_2_31 = new TreeNode();
            node_2_31.Text = "物资自行抽检";
            node_2_31.NavigateUrl = "../welcome.aspx";
            node_2_31.Target = "mainFrame";

            TreeNode node_2_32 = new TreeNode();
            node_2_32.Text = "物资集中抽检";
            node_2_32.NavigateUrl = "../welcome.aspx";
            node_2_32.Target = "mainFrame";

            TreeNode node_2_33 = new TreeNode();
            node_2_33.Text = "物资驻厂监造";
            node_2_33.NavigateUrl = "../welcome.aspx";
            node_2_33.Target = "mainFrame";

            TreeNode node_2_34 = new TreeNode();
            node_2_34.Text = "质量控制点见证";
            node_2_34.NavigateUrl = "../welcome.aspx";
            node_2_34.Target = "mainFrame";
            TreeNode node_2_35 = new TreeNode();
            node_2_35.Text = "专家巡检";
            node_2_35.NavigateUrl = "../welcome.aspx";
            node_2_35.Target = "mainFrame";

            TreeNode node_2_36 = new TreeNode();
            node_2_36.Text = "抽样检测";
            node_2_36.NavigateUrl = "../welcome.aspx";
            node_2_36.Target = "mainFrame";

            node_2_3.ChildNodes.Add(node_2_31);
            node_2_3.ChildNodes.Add(node_2_32);
            node_2_3.ChildNodes.Add(node_2_33);
            node_2_3.ChildNodes.Add(node_2_34);
            node_2_3.ChildNodes.Add(node_2_35);
            node_2_3.ChildNodes.Add(node_2_36);
            TreeView2.Nodes.Add(node_2_1);
            TreeView2.Nodes.Add(node_2_2);
            TreeView2.Nodes.Add(node_2_3);


            TreeNode node_3_1 = new TreeNode();
            node_3_1.Text = "供应商档案";
            node_3_1.NavigateUrl = "../welcome.aspx";
            node_3_1.Target = "mainFrame";
            node_3_1.SelectAction = TreeNodeSelectAction.SelectExpand;


            TreeNode node_3_11 = new TreeNode();
            node_3_11.Text = "供应商信息录入";
            node_3_11.NavigateUrl = "../supplierinfo/add.aspx";
            node_3_11.Target = "mainFrame";

            TreeNode node_3_12 = new TreeNode();
            node_3_12.Text = "供应商信息导入";
            node_3_12.NavigateUrl = "../supplierinfo/importSupplier.aspx";
            node_3_12.Target = "mainFrame";

            TreeNode node_3_13 = new TreeNode();
            node_3_13.Text = "供应商信息查询及输出";
            node_3_13.NavigateUrl = "../supplierinfo/list.aspx";
            node_3_13.Target = "mainFrame";

            //TreeNode node_3_2 = new TreeNode();
            //node_3_2.Text = "供应商联系函";
            //node_3_2.NavigateUrl = "../welcome.aspx";
            //node_3_2.Target = "mainFrame";
            //node_3_2.SelectAction = TreeNodeSelectAction.SelectExpand;


            //TreeNode node_3_21 = new TreeNode();
            //node_3_21.Text = "交货期确认函";
            //node_3_21.NavigateUrl = "../welcome.aspx";
            //node_3_21.Target = "mainFrame";

            //TreeNode node_3_22 = new TreeNode();
            //node_3_22.Text = "催交函";
            //node_3_22.NavigateUrl = "../welcome.aspx";
            //node_3_22.Target = "mainFrame";

            //TreeNode node_3_23 = new TreeNode();
            //node_3_23.Text = "消缺函";
            //node_3_23.NavigateUrl = "../welcome.aspx";
            //node_3_23.Target = "mainFrame";

            TreeNode node_3_3 = new TreeNode();
            node_3_3.Text = "供应商绩效评价";
            node_3_3.NavigateUrl = "../welcome.aspx";
            node_3_3.Target = "mainFrame";
            node_3_3.SelectAction = TreeNodeSelectAction.SelectExpand;


            TreeNode node_3_31 = new TreeNode();
            node_3_31.Text = "产品质量";
            node_3_31.NavigateUrl = "../welcome.aspx";
            node_3_31.Target = "mainFrame";

            TreeNode node_3_32 = new TreeNode();
            node_3_32.Text = "合同履约";
            node_3_32.NavigateUrl = "../welcome.aspx";
            node_3_32.Target = "mainFrame";

            TreeNode node_3_33 = new TreeNode();
            node_3_33.Text = "售后服务";
            node_3_33.NavigateUrl = "../welcome.aspx";
            node_3_33.Target = "mainFrame";

            node_3_1.ChildNodes.Add(node_3_11);
            node_3_1.ChildNodes.Add(node_3_12);
            node_3_1.ChildNodes.Add(node_3_13);
            //node_3_2.ChildNodes.Add(node_3_21);
            //node_3_2.ChildNodes.Add(node_3_22);
            //node_3_2.ChildNodes.Add(node_3_23);
            node_3_3.ChildNodes.Add(node_3_31);
            node_3_3.ChildNodes.Add(node_3_32);
            node_3_3.ChildNodes.Add(node_3_33);

            TreeView3.Nodes.Add(node_3_1);
            //TreeView3.Nodes.Add(node_3_2);
            TreeView3.Nodes.Add(node_3_3);


            TreeNode node_4_1 = new TreeNode();
            node_4_1.Text = "ERP系统的应用";
            node_4_1.NavigateUrl = "../welcome.aspx";
            node_4_1.Target = "mainFrame";
            node_4_1.SelectAction = TreeNodeSelectAction.SelectExpand;

            TreeNode node_4_2 = new TreeNode();
            node_4_2.Text = "电子商务平台的应用";
            node_4_2.NavigateUrl = "../welcome.aspx";
            node_4_2.Target = "mainFrame";
            node_4_2.SelectAction = TreeNodeSelectAction.SelectExpand;


            TreeNode node_4_3 = new TreeNode();
            node_4_3.Text = "物资标准化";
            node_4_3.NavigateUrl = "../welcome.aspx";
            node_4_3.Target = "mainFrame";
            node_4_3.SelectAction = TreeNodeSelectAction.SelectExpand;


            TreeNode node_4_31 = new TreeNode();
            node_4_31.Text = "物料主数据";
            node_4_31.NavigateUrl = "../welcome.aspx";
            node_4_31.Target = "mainFrame";

            TreeNode node_4_32 = new TreeNode();
            node_4_32.Text = "物资采购标准";
            node_4_32.NavigateUrl = "../welcome.aspx";
            node_4_32.Target = "mainFrame";

            TreeNode node_4_4 = new TreeNode();
            node_4_4.Text = "物资供应管理规章制度";
            node_4_4.NavigateUrl = "../welcome.aspx";
            node_4_4.Target = "mainFrame";
            node_4_4.SelectAction = TreeNodeSelectAction.SelectExpand;


            TreeNode node_4_41 = new TreeNode();
            node_4_41.Text = "国网、集团公司文件";
            node_4_41.NavigateUrl = "../welcome.aspx";
            node_4_41.Target = "mainFrame";

            TreeNode node_4_42 = new TreeNode();
            node_4_42.Text = "供电公司文件";
            node_4_42.NavigateUrl = "../welcome.aspx";
            node_4_42.Target = "mainFrame";

            TreeNode node_4_43 = new TreeNode();
            node_4_43.Text = "物资公司文件";
            node_4_43.NavigateUrl = "../welcome.aspx";
            node_4_43.Target = "mainFrame";

            TreeNode node_4_5 = new TreeNode();
            node_4_5.Text = "管理创新";
            node_4_5.NavigateUrl = "../welcome.aspx";
            node_4_5.Target = "mainFrame";
            node_4_5.SelectAction = TreeNodeSelectAction.SelectExpand;


            TreeNode node_4_51 = new TreeNode();
            node_4_51.Text = "QC管理";
            node_4_51.NavigateUrl = "../welcome.aspx";
            node_4_51.Target = "mainFrame";

            node_4_3.ChildNodes.Add(node_4_31);
            node_4_3.ChildNodes.Add(node_4_32);
            node_4_4.ChildNodes.Add(node_4_41);
            node_4_4.ChildNodes.Add(node_4_42);
            node_4_4.ChildNodes.Add(node_4_43);
            node_4_5.ChildNodes.Add(node_4_51);

            TreeView4.Nodes.Add(node_4_1);
            TreeView4.Nodes.Add(node_4_2);
            TreeView4.Nodes.Add(node_4_3);
            TreeView4.Nodes.Add(node_4_4);
            TreeView4.Nodes.Add(node_4_5);

            //TreeNode node_5_1 = new TreeNode();
            //node_5_1.Text = "基础建设";
            //node_5_1.NavigateUrl = "../welcome.aspx";
            //node_5_1.Target = "mainFrame";
            //node_5_1.SelectAction = TreeNodeSelectAction.SelectExpand;


            //TreeNode node_5_2 = new TreeNode();
            //node_5_2.Text = "安全建设";
            //node_5_2.NavigateUrl = "../welcome.aspx";
            //node_5_2.Target = "mainFrame";
            //node_5_2.SelectAction = TreeNodeSelectAction.SelectExpand;


            //TreeNode node_5_3 = new TreeNode();
            //node_5_3.Text = "技能建设";
            //node_5_3.NavigateUrl = "../welcome.aspx";
            //node_5_3.Target = "mainFrame";
            //node_5_3.SelectAction = TreeNodeSelectAction.SelectExpand;

            //TreeNode node_5_4 = new TreeNode();
            //node_5_4.Text = "创新建设";
            //node_5_4.NavigateUrl = "../welcome.aspx";
            //node_5_4.Target = "mainFrame";
            //node_5_4.SelectAction = TreeNodeSelectAction.SelectExpand;

            //TreeNode node_5_5 = new TreeNode();
            //node_5_5.Text = "民主建设";
            //node_5_5.NavigateUrl = "../welcome.aspx";
            //node_5_5.Target = "mainFrame";
            //node_5_5.SelectAction = TreeNodeSelectAction.SelectExpand;

            //TreeNode node_5_6 = new TreeNode();
            //node_5_6.Text = "思想建设";
            //node_5_6.NavigateUrl = "../welcome.aspx";
            //node_5_6.Target = "mainFrame";
            //node_5_6.SelectAction = TreeNodeSelectAction.SelectExpand;

            //TreeNode node_5_7 = new TreeNode();
            //node_5_7.Text = "文化建设";
            //node_5_7.NavigateUrl = "../welcome.aspx";
            //node_5_7.Target = "mainFrame";
            //node_5_7.SelectAction = TreeNodeSelectAction.SelectExpand;

            //TreeNode node_5_8 = new TreeNode();
            //node_5_8.Text = "队伍建设";
            //node_5_8.NavigateUrl = "../welcome.aspx";
            //node_5_8.Target = "mainFrame";
            //node_5_8.SelectAction = TreeNodeSelectAction.SelectExpand;

            //TreeView5.Nodes.Add(node_5_1);
            //TreeView5.Nodes.Add(node_5_2);
            //TreeView5.Nodes.Add(node_5_3);
            //TreeView5.Nodes.Add(node_5_4);
            //TreeView5.Nodes.Add(node_5_5);
            //TreeView5.Nodes.Add(node_5_6);
            //TreeView5.Nodes.Add(node_5_7);
            //TreeView5.Nodes.Add(node_5_8);

            TreeNode node_6 = new TreeNode();
            node_6.Text = "电子公告";
            node_6.NavigateUrl = "../welcome.aspx";
            node_6.Target = "mainFrame";
            node_6.SelectAction = TreeNodeSelectAction.SelectExpand;


            TreeView6.Nodes.Add(node_6);
        }

        protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
        {
            TreeView t = sender as TreeView;
            if (t != null)
            {
                for (int i = 0; i < t.Nodes.Count; i++)
                {
                    if (t.SelectedNode.Value == t.Nodes[i].Value)
                    {
                        if (t.SelectedNode.Expanded != null)
                            t.SelectedNode.Expanded = !t.SelectedNode.Expanded;
                        else
                            t.SelectedNode.Expanded = true;
                    }
                }
            }

        }

       
    }
}